package concurrency.part1.task3;

public class Main {
    public static void main(String[] args) {
        Buffer<Object> buffer =new Buffer<Object>(10);
        ThreadGroup group=new ThreadGroup("Consumers and producers");

        for (int i = 0; i < 5; i++) {
            new Thread(group,new Consumer(String.valueOf(i),buffer)).start();

        }

        for (int i = 0; i < 5; i++) {
            new Thread(group,new Producer(String.valueOf(i),buffer)).start();
        }
    }
}
